home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
033a
/
sage32.zip
/
MANUAL.DOC
< prev
next >
Wrap
Text File
|
1992-01-03
|
20KB
|
562 lines
SAGE 3.2
----------------------------------------------------------------
Reference Manual
by Larry Antram
Megadyne Software Development
Valencia, California
SAGE 3.2 is not public domain software.
SAGE 3.2 is copyright 1991-1992 by Megadyne Software
Development. All rights reserved.
You are free to use, copy, and distribute this program if no fee
is charged for use, copying, or distribution and it is not
modified in any way.
Megadyne Software Development disclaims all warranties, whether
express or implied, including without limitation any implied
warranties of merchantability, fitness for a particular purpose,
data integrity or protection, or functionality.
If you find SAGE useful, a registration of $25 would be
appreciated. To those interested in programming, the C++ source
code is available for $99 to unregistered users, and $74 to
registered users.
For more information, or if you have any questions or comments,
send them to Larry Antram at:
Snail: Megadyne Software Development, 25144-A Steinbeck Avenue,
Valencia, California 91381-1215 USA
Datel: Hidden BBS, +1 805/252-3683, 14.4K USR/HST, Sysop: Jim
Dunham
SAGE and Megadyne are trademarks of Megadyne Software
Development.
CONTENTS
PART 1 INTRODUCTION
Description ........................................ 1.1
Packing List ....................................... 1.2
Requirements ....................................... 1.3
Installation ....................................... 1.4
Execution .......................................... 1.5
Errorlevel ......................................... 1.6
Index File ......................................... 1.7
PART 2 DIGEST FILE
Overview ........................................... 2.1
Capacity ........................................... 2.2
Layout ............................................. 2.3
Signature .......................................... 2.3
Comment ............................................ 2.4
Delimiter .......................................... 2.5
Message ............................................ 2.6
PART 3 STYLE FILE
Overview ........................................... 3.1
Layout ............................................. 3.2
Signature .......................................... 3.3
Design ............................................. 3.4
Macros ............................................. 3.5
Macro Expansion .................................... 3.6
Creating and Editing ............................... 3.7
PART 4 REFERENCE
Commands ........................................... 4.1
?, Show Help Screen ........................ 4.1
i, Show License Information ................ 4.1
x, Extract Message ......................... 4.1
r, Rebuild Index ........................... 4.1
Options ............................................ 4.2
-e, Log Errors ............................. 4.2
-q, Quiet Mode ............................. 4.2
Style Macros ....................................... 4.3
@BODY@ ..................................... 4.3
@FIRST_LINE@ ............................... 4.3
@BODY_MINUS_FIRST_LINE@ .................... 4.3
PART 1
INTRODUCTION
1.1 Description
SAGE is a utility that manages collections of quotes (or
other items). Upon command it will randomly select and
present one.
SAGE can be is useful to:
- BBS System Operators: SAGE will generate logoff,
news, or bulletins for your bbs. SAGE is designed
so it can be used with any bbs software.
- Users with Hard Drives: Put SAGE in your
autoexec.bat file, and it will generate a
different quote every time you start your computer.
1.2 Packing List
SAGE is distributed in compressed archive form.
The contents include the following files:
SAGE.EXE - executable program
MANUAL.DOC - reference manual (this document)
WHATSNEW.DOC - lists changes between versions
SAMPLE.DIG - sample digest file of quotes
ANSI1.STY - sample ANSI graphics style file
ANSI2.STY - sample ANSI graphics style file
ANSI3.STY - sample ANSI graphics style file
ANSI4.STY - sample ANSI graphics style file
PCB1.STY - sample PCBoard codes style file
PCB2.STY - sample PCBoard codes style file
PCB3.STY - sample PCBoard codes style file
PCB4.STY - sample PCBoard codes style file
TEXT1.STY - sample text style file
TEXT2.STY - sample text style file
TEXT3.STY - sample text style file
TEXT4.STY - sample text style file
All files should have the exact same date and time
stamp.
1.3 Requirements
SAGE requires an IBM-PC computer running PC-DOS 3.3 or
greater operating system, or compatible.
1.4 Installation
Installing SAGE onto your hard disk is very simple.
1. create a subdirectory named \SAGE
2. copy all of the files into it
Consult your DOS operations manual for the exact
commands.
1.5 Execution
The following is a quick summary of some commands that
you can type at the DOS prompt.
To see the SAGE help screen: sage ?
To make SAGE generate a quote: sage x sample
If you have ANSI.SYS installed: sage x sample ansi1.sty
To send the quote to a file: sage x sample q.txt
Or to make an ANSI file: sage x sample ansi1 q.ans
Or to make a file for PCBoard:
sage x sample pcb1.sty \pcb\gen\script0
To see the SAGE license info: sage i
1.6 Errorlevel
SAGE will exit with an errorlevel of 0 on success. It
will return an errorlevel of 1 if an error occurs. This
value can be examined in a batch file using the DOS
errorlevel variable.
1.7 Index File
SAGE will generate an index for any digest it uses. This
index is used to quickly retrieve quotes.
If the index is missing SAGE will automatically build a
new one.
If you modify a digest, SAGE will automatically sense
this has happened and rebuild the index.
If you wish to force an index to be rebuilt, then just
delete it. The next time SAGE uses the digest it will
notice the index is missing, and make a new one.
An index file will have the same name as the digest,
except instead of .DIG it will have an .IDX extension.
PART 2
DIGEST FILE
2.1 Overview
Digest files are plain ASCII text files that hold a
collection of messages, which are typically quotes.
Digest files end with the .DIG extension. You can use
any text editor to view or modify them.
2.2 Capacity
Digest files can be up to 4 gigabytes in size.
2.3 Layout
Each line is delimited with a carriage return / line
feed combination.
The specific layout of the file is as follows:
+-------------+
(1) | Signature |
+-------------+
(2) | Comment |
+-------------+
(3) | Delimiter |
+-------------+
(4) | Message |
+-------------+
(5) | Delimiter |
+-------------+
4 and 5 can be repeated as many times as is necessary.
Each of the above is explained in more detail below.
2.3 Signature
The first line of a digest must consist solely of a
predefined signature.
The exact format of the signature is as follows (where
\r represents a carriage return and \n represents a line
feed:
SAGE_DIGEST\r\n
2.4 Comment
The area between the signature and first delimiter is
considered the comment area. You can type any notes or
comments there.
The data in this area can be anything, as long as it
doesn't contain the delimiter mark. (The delimiter mark
is explained in more detail below).
The comment area can be any length, as long as the
entire digest remains smaller than 4 gigabytes.
The comment area is optional; it does not have to be
present.
2.5 Delimiter
A "delimiter" is used to separate items in the digest.
This term can be used in two different contexts.
- the delimiter mark
- the delimiter line
The delimiter mark, by default, is %% ( 2 percent
characters side by side ).
Any line that contains the delimiter mark is considered
a delimiter line.
Anything which is on the delimiter line, besides the
delimiter mark, is ignored.
2.6 Message
The area between delimiters is the message area.
The message area can contain anything, except the
delimiter mark.
Each message can be any length, as long as the entire
digest remains smaller than 4 gigabytes.
PART 3
STYLE FILE
3.1 Overview
Style files are used to format the output created by
SAGE. You can surround it with text, ANSI graphics,
PCBoard control codes, or just about anything else you
can think of.
Several example style files are provided with SAGE.
Style files end with the .STY extension.
3.2 Layout
Each line is delimited with a carriage return / line
feed combination.
The specific layout of the file is as follows:
+-------------+
(1) | Signature |
+-------------+
(2) | Design |
+-------------+
Each of the above is explained in more detail below.
3.3 Signature
The first line of a style file must consist solely of a
predefined signature.
The exact format of the signature is as follows (where
\r represents a carriage return and \n represents a line
feed:
SAGE_STYLE\r\n
3.4 Design
The area between the signature and end of file is the
design area. It can consist of just about anything.
Typically it is text, or text with control codes (ie:
ANSI,PCBoard-Codes,etc.)
The design area can be any size.
3.5 Macros
When creating a style file, you place macros into the
design area. These macros tell SAGE where to put the
quote.
Here is a list of the macros:
@BODY@
@FIRST_LINE@
@BODY_MINUS_FIRST_LINE@
The @BODY@ macro will be overwritten with the entire
quote.
The @FIRST_LINE@ macro will be overwritten with the
first line of the quote.
The @BODY_MINUS_FIRST_LINE@ macro will be overwritten
with the entire quote, minus the first line.
3.6 Macro Expansion
SAGE will expand the macros by overwriting them with the
quote data. If the quote data is shorter than the macro
itself, then the rest of the macro is replaced with
space characters.
If you intend to "frame" a quote, then you should make
sure you have allowed enough space to completely contain
the longest line of any quote, between the start of the
macro and the start of any significant data on the right
side of the design.
The file ANSI4.STY is an example of how to do this.
Notice the space to the right of the @BODY@ macro.
3.7 Creating and Editing
You can make style files easily, with a program such as
TheDraw, PCBDraw, or even a text editor such as QEdit.
Just place the style macros where you want them to be
overwritten in your picture.
If you use drawing program, it is recommended that you
add the style signature line, with a text editor, when
you are done. Otherwise, you may need to edit the style
file in order to remove any extraneous control codes
from the signature line.
Remember, the signature line must remain exactly as
outlined above. It can't be any different.
PART 4
REFERENCE
4.1 Commands
The following is a listing of the commands, their usage, and the
options that can be used with them.
?, Show Help Screen
Syntax: sage ?
This commands prints the help screen to the standard
output device, which (unless redirected) is the monitor.
Example: sage ?
i, Show License Information
Syntax: sage i
This command prints licensing information to the standard
output device. It also lists how to contact the author.
Example: sage i
x, Extract Message
Syntax: sage x [options] <digest_file> [style_file]
[output_file]
This will extract an item from a digest, and print it to
the standard output.
Other information besides the message is included. This
includes a copyright notice, the number of items in the
digest, which item number was selected, etc.
Example: sage x sample.dig
Example: sage x sample.dig > output.txt
An alternate, and perhaps more desirable, method is to
use an output file. It can be specified on the command
line.
Example: sage x sample.dig output.txt
You can also use a style file to format how the output
will appear.
Example: sage x sample.dig ansi1.sty
Example: sage x sample.dig ansi1.sty output.ans
r, Rebuild Index
Syntax: sage r [options] <digest_file>
This command will force the reconstruction of an index
file.
Example: sage r sample.dig
An alternate method is to just delete the index file.
Example: del sample.idx
4.2 Options
-e, Log Errors
This option will report any errors that occur to the
file sage.err.
This option can be used with the x and r commands.
Examples: sage x -e sample.dig quote.txt
sage r -e sample.dig
-q, Quiet Mode
The -q option will force SAGE into the "quiet" mode.
This keeps SAGE from reporting extra information to the
screen.
For example, in quiet mode, SAGE does not report the
number of messages in the digest, the actual message
number selected, nor place a > character before any
message that is extracted to the screen.
This option can be used with the x and r commands.
Examples: sage x -q sample.dig
sage r -q sample.dig
4.3 Style Macros
@BODY@
SAGE will overwrite this macro with the entire body of the
message. The line that contains this macro, is repeated
for the length of the quote.
@FIRST_LINE@
SAGE will overwrite this macro with the first line of the
quote.
@BODY_MINUS_FIRST_LINE@
This is an alternate to the @BODY@ macro. It is the
same, except the first line is omitted.
APPENDIX A
COMMENTS
If you:
- have been waiting for a program to appear, but it just
never happens
- need more information or have a question about this
program
- have any comments, suggestions, or requests
Then drop me a note. I'm a pretty good at creating applications
with C and C++ under DOS, GEM, and Windows (and hopefully OS/2
soon).
Address to Larry Antram at:
Snail: Megadyne Software Development, 25144-A Steinbeck
Avenue, Valencia, California 91381-1215 USA
Datel: Hidden BBS, +1 805/252-3683, 14.4K USR/HST